<extend name="Public/base"/>
<block name="body">
  <form method="post" class="form-horizontal J_ajaxForm" action="{:U("")}">
      <div class="tab-content">
    <div class="space-4"></div>
   

           <div class="space-4"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label "> 上级 </label>

              <label class="col-sm-10" style="vertical-align: middle">{$parent_name|default="顶级菜单"}</label>

          </div>

          <if condition="!$top_menu">

          <div class="form-group">
              <label class="col-sm-2 control-label "> 类型 </label>
              <div class="col-sm-10">


                  <select name="type" class="normal_select">


                      <option <if condition="$data[type] eq 'view'"> selected </if> value="view"  >跳转链接 </option>
                      <option <if condition="$data[type] eq 'click'"> selected </if> value="click">点击菜单 </option>
                      <option  <if condition="$data[type] eq 'scancode_waitmsg'"> selected </if> value="scancode_waitmsg">扫码带提示 </option>
                      <option  <if condition="$data[type] eq 'scancode_push'"> selected </if> value="scancode_push">扫码推事件 </option>
                      <option disabled <if condition="$data[type] eq 'pic_sysphoto'"> selected </if> value="pic_sysphoto">系统拍照 </option>
                      <option disabled <if condition="$data[type] eq 'pic_weixin'"> selected </if> value="pic_weixin">相册发图 </option>
                      <option disabled <if condition="$data[type] eq 'pic_photo_or_album'"> selected </if> value="pic_photo_or_album">拍照或者相册 </option>
                      <option disabled <if condition="$data[type] eq 'location_select'"> selected </if> value="location_select"> 发送位置(标签) </option>
                      <option disabled <if condition="$data[type] eq 'media_id'"> selected </if>  value="media_id">下发素材 </option>
                      <option disabled <if condition="$data[type] eq 'view_limited'"> selected </if> value="view_limited">下发图文 </option>





                  </select>






              </div>
          </div>




          <div class="space-4"></div>
          <div class="form-group">
              <label class="col-sm-2 control-label "> 名称 </label>
              <div class="col-sm-10">
                  <input type="text"  value="{$data.name}"  name="name" class="col-xs-10 col-sm-5" />
              </div>
          </div>



          <div class="space-4"></div>
          <div class="form-group">
              <label class="col-sm-2 control-label "> KEY</label>
              <div class="col-sm-10">

                  <input type="text"  value="{$data.key}"  name="key" class="col-xs-10 col-sm-5" />


              </div>
          </div>




          <div class="form-group">
              <label class="col-sm-2 control-label "> URL </label>
              <div class="col-sm-10">

                  <input type="text"  value="{$data.url}"  name="url" class="col-xs-10 col-sm-5" />


              </div>
          </div>





          <div class="space-4"></div>


          <div class="form-group" >
              <label class="col-sm-2 control-label "> media_id </label>
              <div class="col-sm-10">

                  <input type="text"  value="{$data.media_id}"  name="media_id" class="col-xs-10 col-sm-5" />


              </div>
          </div>


              <else/>

              <div class="space-4"></div>
              <div class="form-group">
                  <label class="col-sm-2 control-label "> 名称 </label>
                  <div class="col-sm-10">
                      <input type="text"  value="{$data.name}"  name="name" class="col-xs-10 col-sm-5" />
                  </div>
              </div>

              </if>
          
          
      </div>
    <input type="hidden"  name="id"   value="{$data.id}"  />
      <div class="form-actions">
      <button class="btn btn-info ajax-post"   target-form="J_ajaxForm" type="submit">  更新</button>
      	 <a class="btn btn-return" href="__URL__" >返 回</a>
      </div>
    </form>
</block>
<block name="plugin-script"> 
  <script src="__JS__/content.js"></script> 

</block>